package com.ocom.payconfig.controller;

import com.ocom.common.constant.PayConfigUrl;
import com.ocom.common.resp.Result;
import com.ocom.common.vo.payconfig.cloudcomputing.CloudComputingVo;

import com.ocom.payconfig.service.CloudComputingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class CloudComputingController {

    @Autowired
    public CloudComputingService cloudComputingService;

    @PostMapping(PayConfigUrl.Url_getCloudComputingList)
    public Result getCloudComputingList(@RequestBody CloudComputingVo cloudComputingVo) {

        Long comId = Long.valueOf(cloudComputingVo.getComId());

        return cloudComputingService.queryPersonnelInfoPage(comId, cloudComputingVo);
    }

    @PostMapping(PayConfigUrl.Url_updateCloudComputingInfo)
    public Result updateCloudComputingInfo(@RequestBody CloudComputingVo cloudComputingVo) {
        Long comId = Long.valueOf(cloudComputingVo.getComId());
        return cloudComputingService.modifyCloudComputingInfo(comId, cloudComputingVo);

    }

}
